161
161
Figures
I.1
Algorithm of this book....................................................................................3
1.1
Making chocolate chip cookies.......................................................................6
1.2
Sales figures by state.......................................................................................8
1.3
Combined spreadsheet...................................................................................10
2.1
Excel sheet.....................................................................................................13
2.2
Sheet2............................................................................................................14
2.3
View Menu—Record Macro.........................................................................14
2.4
Sheet1............................................................................................................14
2.5
Control-C.......................................................................................................14
2.6
Control-V......................................................................................................14
2.7
Stop recording...............................................................................................15
2.8
Macro1..........................................................................................................15
2.9
Macro1 code..................................................................................................16
2.10
VBA Project..................................................................................................16
2.11
Game area......................................................................................................17
2.12
Win message code.........................................................................................17
2.13
Tic Tac Toe user interface..............................................................................18
2.14
Userform........................................................................................................19
2.15
Form Controls................................................................................................19
2.16
Properties Window........................................................................................19
2.17
Creating Text Boxes in Form.........................................................................20
2.18
Text Box 1.....................................................................................................20
2.19
Project Explorer.............................................................................................22
2.20
InitFormFirst.................................................................................................22
2.21
CommandButton1.........................................................................................23
2.22
InitForm.........................................................................................................23
2.23
Code in TextBox1..........................................................................................24
2.24
Find Next Empty Cell....................................................................................26
2.25
Computer Play...............................................................................................27
2.26
Unique number for each cell.........................................................................29
2.27
Unique totals.................................................................................................30
2.28
Magic square.................................................................................................31
2.29
Next Empty Form Cell..................................................................................31
2.30
Win or loss.....................................................................................................32
2.31
Toggle Breakpoint.........................................................................................33
2.32
Stopping Code...............................................................................................33
3.1
Sudoku...........................................................................................................35
3.2
9 by 9 matrix.................................................................................................36
3.3
Developing cant be list..................................................................................37
3.4
Interaction between grids..............................................................................45
3.5
Love-locked pair............................................................................................49
3.6
Second love-locked pair................................................................................52